<?xml version="1.0" encoding="utf-8"?>
<sqlMap namespace="Enumeration" 
xmlns="http://ibatis.apache.org/mapping" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	
	<alias>
		<typeAlias alias="Enumeration" type="MyBatis.DataMapper.SqlClient.Test.Domain.Enumeration, MyBatis.DataMapper.SqlClient.Test"/>
	</alias>
	
	<resultMaps>                                    
		<resultMap id="enumeration-result"  class="Enumeration" >
			<result property="Id"           column="Enum_ID"/>
			<result property="Day"			column="Enum_Day"/>
			<result property="Color"		column="Enum_Color"/>
			<result property="Month"		column="Enum_Month" nullValue="All"/>
		</resultMap>
	</resultMaps>
	
	<statements>
	
		<select id="GetEnumerationNullValue" 
			parameterClass="Integer" 
			resultMap="enumeration-result">
			select
				Enum_ID,
				Enum_Day,
				Enum_Color,
				Enum_Month
			from Enumerations  
			where Enum_ID = #value# 
		</select>
		
		<select id="GetEnumeration" parameterClass="Integer" resultClass="Enumeration">
      select
      Enum_ID as Id,
      Enum_Day as Day,
      Enum_Color as Color,
      Enum_Month as Month
      from Enumerations
      where Enum_ID = #value#
    </select>
		
		<insert id="InsertEnumViaParameterMap" parameterMap="insert-params" >
      insert into Enumerations
      (Enum_ID, Enum_Day, Enum_Color, Enum_Month)
      values
      (?, ?, ?, ?)
    </insert>
		
	</statements>
	
	<parameterMaps>
		<parameterMap id="insert-params" class="Enumeration">
			<parameter property="Id" column="Enum_ID" />
			<parameter property="Day" column="Enum_Day"/>
			<parameter property="Color" column="Enum_Color" />
			<parameter property="Month" column="Enum_Month" nullValue="All"/>
		</parameterMap>
	</parameterMaps>
	
</sqlMap>
